<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>[Generic Component Framework v3] GCF::ObjectListEventListener Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<!--link href="tabs.css" rel="stylesheet" type="text/css"-->
</head><body>
 <div id="wrapper">
    <div id="logo_box">
        <a class="img_link" href="https://github.com/pnudupa/gcf" target="_blank" ><img style="float:left;margin-left:10px;margin-top:5px;margin-bottom:5px;"src="header_gcf_logo.jpg" alt="GCF LOGO"/></a>
        <a class="img_link" href="https://www.vcreatelogic.com/" target="_blank" ><img style="float:right;margin-right:10px; margin-top: 30px;" src="header_vcl_logo.jpg" alt="VCL LOGO"/></a>
        <div style="clear:both"></div>
    </div>
    <div class="nav">
        <ul>
            <li class="selectedpage">
                <a class="a-home" href="index.html" >
                    <span>Home</span>
                </a>
            </li>
            <li>
                <a class="a-classes " href="classes.html">
                    <span>All Classes</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_modules.html">
                    <span>Modules</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_guides_and_videos.html">
                    <span>Guides & Videos</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_tools_and_inbuilt_components.html">
                    <span>Tools & Components</span>
                </a>
            </li>
        </ul>
    </div>
    <div id="main-content">
        <div class="inside">
        <div>
<!-- Generated by Doxygen 1.8.16 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>GCF</b></li><li class="navelem"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html">ObjectListEventListener</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_g_c_f_1_1_object_list_event_listener-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">GCF::ObjectListEventListener Class Reference<div class="ingroups"><a class="el" href="group__gcf__core.html">GCF Core Module</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html" title="ObjectListEventListener listens to GCF::ObjectList&#39;s events.">ObjectListEventListener</a> listens to <a class="el" href="class_g_c_f_1_1_object_list.html" title="This class manages a list of live QObject pointers.">GCF::ObjectList</a>'s events.  
 <a href="class_g_c_f_1_1_object_list_event_listener.html#details">More...</a></p>

<p><code>#include &lt;GCF3/ObjectList&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8ff90650697e04bcd773eca37f1b620d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#a8ff90650697e04bcd773eca37f1b620d">ObjectListEventListener</a> ()</td></tr>
<tr class="separator:a8ff90650697e04bcd773eca37f1b620d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8080a35f89335f9fef396c1af95849e"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#ad8080a35f89335f9fef396c1af95849e">~ObjectListEventListener</a> ()</td></tr>
<tr class="separator:ad8080a35f89335f9fef396c1af95849e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a521de9fb96cc6934827df962b7336fd8"><td class="memItemLeft" align="right" valign="top">virtual QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#a521de9fb96cc6934827df962b7336fd8">listenerType</a> () const</td></tr>
<tr class="separator:a521de9fb96cc6934827df962b7336fd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab05f82c68c2227e96cd5017cb27113ca"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#ab05f82c68c2227e96cd5017cb27113ca">objectAdded</a> (int index, QObject *obj)</td></tr>
<tr class="separator:ab05f82c68c2227e96cd5017cb27113ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92de70a172a259fa9874733697caa64a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#a92de70a172a259fa9874733697caa64a">objectRemoved</a> (int index, QObject *obj)</td></tr>
<tr class="separator:a92de70a172a259fa9874733697caa64a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51c67280aea0f81a15794d335dbdd7ad"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_list_event_listener.html#a51c67280aea0f81a15794d335dbdd7ad">objectDeleted</a> (int index, QObject *obj)</td></tr>
<tr class="separator:a51c67280aea0f81a15794d335dbdd7ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>When set as event listener of <code><a class="el" href="class_g_c_f_1_1_object_list.html" title="This class manages a list of live QObject pointers.">GCF::ObjectList</a></code>, the corresponding virtual functions of this class will be called when a <code>QObject</code> pointer is added, removed or deleted from the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>.</p>
<p>To set this as event listener of <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a> you need to use the method <a class="el" href="class_g_c_f_1_1_object_list.html#a638293fd1577ad4befea9c8a125f61a4">GCF::ObjectList::setEventListener(GCF::ObjectListEventListener* listener)</a>. Only one event listener can listen to <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a> at a time.</p>
<p>If you want to have several listeners receive event notifications on a <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a> list, then you can install a <a class="el" href="class_g_c_f_1_1_object_list_event_broadcaster.html">GCF::ObjectListEventBroadcaster</a> on the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a> and register all event listeners with the broadcaster. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a8ff90650697e04bcd773eca37f1b620d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ff90650697e04bcd773eca37f1b620d">&#9670;&nbsp;</a></span>ObjectListEventListener()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListEventListener::ObjectListEventListener </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Default constructor. </p>

</div>
</div>
<a id="ad8080a35f89335f9fef396c1af95849e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8080a35f89335f9fef396c1af95849e">&#9670;&nbsp;</a></span>~ObjectListEventListener()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListEventListener::~ObjectListEventListener </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a521de9fb96cc6934827df962b7336fd8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a521de9fb96cc6934827df962b7336fd8">&#9670;&nbsp;</a></span>listenerType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListEventListener::listenerType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the listener type. By default listener type is "GCF::ObjectListEventListener". </dd></dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_object_list_watcher.html#a5edc32e488b5a09c4dd0636206061636">GCF::ObjectListWatcher</a>, and <a class="el" href="class_g_c_f_1_1_object_list_event_broadcaster.html#a39729407670a8db88cc8bc404a596859">GCF::ObjectListEventBroadcaster</a>.</p>

</div>
</div>
<a id="ab05f82c68c2227e96cd5017cb27113ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab05f82c68c2227e96cd5017cb27113ca">&#9670;&nbsp;</a></span>objectAdded()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListEventListener::objectAdded </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>By default there is no implementation. This function will be called when an object is added to the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>index at which the object had been added to the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>. </td></tr>
    <tr><td class="paramname">obj</td><td><code>QObject</code> pointer which was added to the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_object_list_event_broadcaster.html#ac1dd16a6c19c08e1ea7bec6422393262">GCF::ObjectListEventBroadcaster</a>.</p>

</div>
</div>
<a id="a92de70a172a259fa9874733697caa64a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92de70a172a259fa9874733697caa64a">&#9670;&nbsp;</a></span>objectRemoved()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListEventListener::objectRemoved </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>By default there is no implementation. This function will be called when an object is removed from the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>index from which the object had been removed from <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>. </td></tr>
    <tr><td class="paramname">obj</td><td>QObject pointer which was removed from the <a class="el" href="class_g_c_f_1_1_object_list.html">GCF::ObjectList</a>. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_object_list_event_broadcaster.html#a16f8aa73e942b0a537e0cdedb7c6f44f">GCF::ObjectListEventBroadcaster</a>.</p>

</div>
</div>
<a id="a51c67280aea0f81a15794d335dbdd7ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51c67280aea0f81a15794d335dbdd7ad">&#9670;&nbsp;</a></span>objectDeleted()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectListEventListener::objectDeleted </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>By default there is no implementation. This function will be called when an object is deleted, which was there in the <a class="el" href="class_g_c_f_1_1_object_list.html" title="This class manages a list of live QObject pointers.">GCF::ObjectList</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>index at which the object pointer the existed in <a class="el" href="class_g_c_f_1_1_object_list.html" title="This class manages a list of live QObject pointers.">GCF::ObjectList</a>. </td></tr>
    <tr><td class="paramname">obj</td><td><code>QObject</code> pointer which was deleted. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented in <a class="el" href="class_g_c_f_1_1_object_list_event_broadcaster.html#a6bf4cf0b4df081ac64fe87c7e38b70eb">GCF::ObjectListEventBroadcaster</a>.</p>

</div>
</div>
</div><!-- contents -->
</div>
</div>
</div>
<div class="footer_content">
<table width="100%" class="footer">
<tr>
<td align="left" width="50%">Copyright &copy; 2013-2019,
 <a class="el" href="http://www.vcreatelogic.com" target="_black">VCreate Logic Private Limited</a></td>
<td align="right" width="50%"><a class="el" href="http://www.vcreatelogic.com/products/gcf" target="_black">GCF - Generic Component Framework</a></td>
</tr>
</table>
</div>
</div>
</body>
</html>
